#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
//    QPushButton* button=new QPushButton(this);
//    button->setText("一个被禁用的按钮罢了");
//    button->setEnabled(false);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_2_clicked()
{
    this->ui->pushButton_2->setEnabled(false);
    this->ui->pushButton_3->setEnabled(true);

}

void Widget::on_pushButton_3_clicked()
{
    this->ui->pushButton_2->setEnabled(true);
    this->ui->pushButton_3->setEnabled(false);
}
